Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Camera Placements

A camera location is the position, in the world coordinate system, of a camera. A  camera placement is a camera location together with an orientation and a direction. You specify a camera's orientation by indicating its up vector, the vector that defines which direction is up. You specify a camera's direction by indicating a point of interest, the point at which the camera is aimed. The vector that is the result of subtracting the camera location from the point of interest is the viewing direction or camera vector. In general, a camera's up vector should be perpendicular to its viewing direction and should be normalized. You can, however, specify any up vector that isn't colinear with the viewing direction. Figure 3 shows the placement of a camera.

Figure 3 A camera's placement

Because a camera defines a point of view onto a model, the camera location is also called the eye point .

In QuickDraw 3D, you specify a camera's placement by filling in the fields of a camera placement structure, defined by the TQ3CameraPlacement data type.

typedef struct TQ3CameraPlacement {
    TQ3Point3D                          cameraLocation;
    TQ3Point3D                          pointOfInterest;
    TQ3Vector3D                         upVector;
} TQ3CameraPlacement;

See "Camera Placement Structure" for complete information about the camera placement structure.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |